package com.laivi.basic.util;

import com.laivi.basic.common.exception.CheckException;

/**
 * @author laivi.zhu@gmail.com
 * @date 2014-7-1
 * description:
 */
public class AssertUtil {

	public static void notNull(Object obj,String msg) throws CheckException{
		if(DataUtil.isNull(obj)){
			throw new CheckException(msg);
		}
	}
	
	public static void notEmpty(String value,String msg) throws CheckException{
		if(DataUtil.isEmpty(value)){
			throw new CheckException(msg);
		}
	}
	
	public static void isTrue(boolean condition,String msg) throws CheckException{
		if(!condition){
			throw new CheckException(msg);
		}
	}
}
